<?php require_once('includes/config.php'); ?>
<?php require_once('includes/commonfunctions.php'); ?>
<?php
$metaTitle = 'Indian Mobile Price - Mobile phone prices in India';
$metaDescription = 'find best price and specifications for mobile phones in india';
$metaKeywords = 'mobile phone, mobile phone price, indian mobile phones, mobile phone pricing, cellphones, cheap mobile phones, low rate';
//-----------------------------------------------------------------------//

function getProductsByCategory($categoryId) {
	$query = "SELECT *
			FROM products 
			LIMIT 9";
			
	$resultSet = mysql_query($query);
	if(!$resultSet) { echo mysql_error(); }
	
	while($row = mysql_fetch_assoc($resultSet)) {
		$rows[] = $row;
	}
	return $rows;
}

$mobilePhoneCategory = 22;
$data['products'] = getProductsByCategory($mobilePhoneCategory);
//echo '<pre>';var_dump($data['products']);exit;
//-----------------------------------------------------------------------//
?>
<?php include('includes/header.php')?>
</head>
<body>

<div id="main_container">
	
<?php include('includes/toppart.php')?>       
      
<?php include('includes/leftpart.php')?>
   
   
  <div class="center_content">
   	<!--<div class="center_title_bar">Latest Products</div>-->
	
	<? for ($i = 0; $i < count($data['products']); $i++) {
		$record = $data['products'][$i];
	?>
	<div class="prod_box">
		<div class="top_prod_box"></div>
            <div class="center_prod_box">            
                 <div class="product_title"><a href="products/<?=friendlyURL($record['title'], $record['id'])?>"><?=$record['title']?></a></div>
                 <div class="product_img"><a href="products/<?=friendlyURL($record['title'], $record['id'])?>"><img src="<?=$siteurl?>images/external/tiny/<?=$record['image']?>" alt="" title="" border="0" /></a></div>
                 <div class="prod_price"><span class="price">Rs. <?=number_format($record['indian_price'], 2)?></span></div>
            </div>
            <div class="bottom_prod_box"></div>             
        </div>
	<? } ?>
 
   </div><!-- end of center content -->
   
</div><!-- end of main content -->
   
   <?php include('includes/rightpart.php')?>
   <?php include('includes/bottompart.php')?>
</div>
<!-- end of main_container -->
</body>
</html>